﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ManagerBackEnd
{
    class PlayerDataModel
    {
        public List<Player> Players = new List<Player>();
        private const int NumberOfPlayers = 1; // For simulation only.

        public void UpdatePlayerList()
        {
            for (var i = 0; i < NumberOfPlayers; i++)
            {
                Players.Add(new Player());
            }
        }

        public Player GetPlayer(String playerFullName)
        {
            foreach (var p in Players)
            {
                if (p.FirstName + " " + p.LastName == playerFullName)
                {
                    return p;
                }
            }
            return null;
        }
    }
}
